<template>
  <el-header>
    <div>
      <img src="@/assets/img/logo/logo.jpeg" alt="" />
      <span>电商管理系统</span>
    </div>
    <el-button type="info" @click="logout">安全退出</el-button>
  </el-header>
</template>

<script>
export default {
  name: "HomeHeader",
  methods: {
    logout() {
      window.sessionStorage.clear();
      this.$router.push("/login");
    },
  },
};
</script>

<style scoped>
.el-header {
  background-color: #373d41;
  display: flex;
  justify-content: space-between;
  padding-left: 0;
  align-items: center;
  color: #fff;
  font-size: 20px;
  width: 100%;
}
.el-header div {
  display: flex;
  align-items: center;
}
.el-header div span {
  padding-left: 15px;
}
</style>